# -*- coding: utf-8 -*-
# @Time    : 2019/2/22 10:28
# @Author  : cj
# @File    : annotation_object.py
from dataset.bounding_box import BoundingBox


class AnnotationObject:
    """
    AnnotationObject:形如[class_name,difficult，boundingbox]，封装了boundingbox的坐标，类名和是否为困难样本
    """

    def __init__(self, class_name: str, difficult: bool, boundingbox: BoundingBox):
        self._class_name = class_name
        self._difficult = difficult
        self._boundingbox = boundingbox

    def get_class_name(self):
        """
        :return: 返回当前boundingbox的类名
        """
        return self._class_name

    def is_difficult(self):
        """
        :return: 返回当前boundingbox是否为困难样本
        """
        return self._difficult

    def set_difficult(self, difficult: bool):
        """
        设置difficult的值
        :param difficult: 更改后的difficult的值
        """
        self._difficult = difficult

    def get_boundingbox(self):
        """
        :return: 返回boundingbox的坐标值
        """
        return self._boundingbox

    def set_class_name(self, class_name: str):
        """
        设置类名
        :param class_name: 更改后的类名
        """
        self._class_name = class_name

    def set_boundingbox(self, boundingbox: BoundingBox):
        """
        设置boundingbox坐标
        :param boundingbox: 更改后的boundingbox坐标
        """
        self._boundingbox = boundingbox
